package com.flyduck.system.vo.user;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.List;

/**
 * @program: flyduck-platform
 * @description: 系统:用户更新请求VO
 * @author: flyduck
 * @create: 2021-02-05 21:33
 **/
@Data
@ApiModel(value = "系统:用户更新请求VO")
public class SysUserUpdateReqVO implements Serializable {

    @NotBlank(message = "ID不能为空")
    @ApiModelProperty(value = "ID",required = true)
    private String id;

    @NotBlank(message = "昵称不能为空")
    @ApiModelProperty(value = "昵称",required = true)
    private String nickName;

    @NotBlank(message = "用户名不能为空")
    @ApiModelProperty(value = "用户名",required = true)
    private String userName;

    @NotBlank(message = "密码不能为空")
    @ApiModelProperty(value = "密码",required = true)
    private String password;

    @NotBlank(message = "头像不能为空")
    @ApiModelProperty(value = "头像",required = true)
    private String avatar;

    @NotBlank(message = "手机号码不能为空")
    @Pattern(regexp = "0?(13|14|15|17|18|19)[0-9]{9}",message = "手机号码格式不正确")
    @ApiModelProperty(value = "手机号码",required = true)
    private String phone;

    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    @ApiModelProperty(value = "邮箱",required = true)
    private String email;

    @NotBlank(message = "邮箱不能为空")
    @Pattern(regexp = "[/^1$|^2$|^3&/]*", message = "性别为：1男 2女 3未知")
    @ApiModelProperty(value = "性别",required = true)
    private String sex;

    @NotBlank(message = "邮箱不能为空")
    @Pattern(regexp = "[/^1$|^2&/]*", message = "状态为：1启用 2禁用")
    @ApiModelProperty(value = "状态",required = true)
    private String status;

    @NotNull(message = "部门id不能为空")
    @ApiModelProperty(value = "部门id",required = true)
    private String deptId;

    @NotEmpty(message = "角色id集合不能为空")
    @ApiModelProperty(value = "角色id集合",required = true)
    private List<String> roleIds;

    @NotEmpty(message = "职位id集合不能为空")
    @ApiModelProperty(value = "职位id集合",required = true)
    private List<String> postIds;
}
